/*
* yasl-qt (or simply yasl) is a qt-based program for symbian devices
* and intended to manage a shopping list.
* The acronym yasl stands for Yet Another Shopping List.
* 
* Copyright (C) 2011 - Alessandro Orlandi
* 
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef ADAPTIVEKEYBOARD_H
#define ADAPTIVEKEYBOARD_H

#include <QFrame>
#include <QGridLayout>
#include <QPushButton>
#include <QTableWidget>

class AdaptiveKeyboard : public QFrame
{
    Q_OBJECT
public:
    explicit AdaptiveKeyboard(QWidget *parent = 0);
    bool isVisible() { return mVisible; }


signals:
    void sigKeyPressed(QString);
    void sigKeyboardReset();


public slots:
    bool toggleVisible();    
    void updateKeyboard(QStringList, QString);
    void redrawKeyboard();
    void notifyKeyPressed(QString);
    void reset();




protected:
    int mButtonWidth, mButtonHeigth;
    int mRow, mCol;
    bool mVisible;
    QGridLayout* mGridLayout;
    QList<QPushButton*> mKeys;
    QStringList mWords;
    QStringList mKeysList ;


};

#endif // ADAPTIVEKEYBOARD_H
